home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / LADDERS.ZIP / MAKES.DOC < prev    next >
Text File  |  1995-05-31  |  24KB  |  411 lines

  1. MAKES - utility
  2. ───────────────
  3.  
  4. The design of sprites, background pictures and tiles is much to tedious to be
  5. carried out manually. For this reason, there are two utility programs to
  6. simplify that task. The first one is a resident program named "GRAB" to
  7. capture graphics from other applications and convert them into sprites, the
  8. second is MAKES, a spritemaker program.
  9. To use it, you must have a mouse installed and a Super-VGA card.
  10.  
  11. -> MAKES uses a "tweaked" 640x400x256 graphic mode, only available at Super-
  12.    VGA-cards! If you don't have one (or one which chip-set isn't supported by
  13.    the supplied BGI-driver), you won't be able to run MAKES!
  14.    Let me cite from Jordan Hargrave's docs:
  15.  
  16.    >Card types supported: (SuperVGA drivers)
  17.    >Ahead, ATI, Chips & Tech, Everex, Genoa, Paradise, Oak, Trident (both 8800
  18.    >and 8900), Tseng (both 3000 and 4000 chipsets) and Video7.
  19.    >These drivers will also work on video cards with VESA capability.
  20.    >
  21.    >I have not tested these drivers on all these card types, so I can not
  22.    >guarantee perfect operation with your card.  I have tested them extensively
  23.    >on Trident, Tseng and ATI cards, and have had no problems. (Trident 8800
  24.    >cards occasionally have problems, especially older models)
  25.    
  26.    If you can't run MAKES, then please drop me a note specifying which brand of
  27.    VGA card you have and which chip-set it uses!
  28.  
  29. There are normally no parameters or such things, just start it!
  30. (However, if you _do_ have a SVGA and MAKES does not show its graphic screen
  31.  properly, then use the syntax "MAKES /480" to invoke the program in
  32.  640x480x256 graphic mode instead)
  33.  
  34. The screen is divided in several areas:
  35.  - the so-called "work area" in the upper left region, in which you paint your
  36.    sprite
  37.  - the palette area to the right of it, where you choose colors for painting
  38.    or define new colors
  39.  - the info bar right beneath the work area, which informs you about the
  40.    cursor position and some other actually set data
  41.  - the icon field, supplying 18 different functions: 8 "tools" and 10 pure
  42.    functions
  43.  - 10 function boxes at the very screen bottom, which can also be accessed by
  44.    pressing the appropriate function key (ever seen the Norton Commander?)
  45.  
  46. (Note that a lot of the icons/function boxes have two functions, where the
  47.  second one can be reached by holding down the shift-key while pressing/
  48.  clicking at the icon - this will be described later on, but you can always
  49.  press F1 in MAKES for a short summary.)
  50.  
  51.  
  52. Now let's take a small tout through MAKES!
  53.  
  54. -> I propose that you print out this part of the documentation and then start
  55.    MAKES.EXE for the following description!!!
  56.  
  57. Huh - where to begin? Okay, look at the work area's boundary: it has small
  58. marks on it, indicating 8 pixel intervals. Move the mouse cursor somewhere into
  59. the workarea: right beneath the work area, your PC will display the mouse
  60. cursor's position and what color is currently set at that point. Now move around
  61. and convince yourself about the marks' values. Press the left mouse button a
  62. few times: each time, a white pixel will be drawn at the cursor position,
  63. because "pixel" is the selected tool and "white" the actually set drawing color.
  64. Nothing whopping, eh? - Now press "+" a few times: wow! You zoom into the work
  65. area as much as you wish (well, I limited it to a factor 30, but if _that_ is
  66. not enough you should consider selling your PC for a seeing-eye dog, anyway!).
  67. Use "-" to zoom out, down to value 1: for easier pointing, the cursor will
  68. change to a small crosshair pointer when zooming is at factor 1.
  69. -> Note that as the screen you look at has resolution 640x400, while AniVGA's
  70.    has 320x200, zoom=2 (the default value) will give you normal 1:1 aspect
  71.    ratio!
  72. You don't like monochrome pictures? Ok, then click (with the left mouse button)
  73. at another color in the palette area: this changes the drawing color to the
  74. color you clicked at.
  75. Repeat choosing a color, but this time press the _right_ mouse button: a menu
  76. will pop up and let you change the RGB-values of that color; this way, you may
  77. alter the palette for your sprites!
  78. -> Note that RGB-values reach from 0 to 63. If you want to copy another color's
  79.    values, then just click at this color; e.g. if you want to have color 222
  80.    hold the same color as 111 (for example as a template), then click with the
  81.    _right_ button at color 222 and then with the _left_ button at color 111
  82. Now choose another drawing tool, let's say lines: click at this icon and move
  83. back into the work area. Choose a starting point and click at it (release the
  84. mouse button!): now you started a line: move around the mouse to route your
  85. line; if you are content with it, then press the left button again. If you
  86. decide to cancel the line drawing instead, then press the right button instead.
  87. -> This "philosophy" will be used for all tools: press the left button to
  88.    start/advance/complete an action, press the right button any time to cancel
  89.    what you are doing - so get used to it!
  90. Now repeat the process of drawing a line, but hold down "shift" while you are
  91. clicking at the starting point: this tells the object "to be aligned" which
  92. in the context of lines means that you are drawing a horizontal, vertical or
  93. diagonal line! In the same way, you can align rectangles to become squares and
  94. ellipses to circles. Try it! Choose these icons and draw the according objects,
  95. aligned and not aligned (if you choose the lower rectangle/ellipse icon, your
  96. objects will be filled out with the actual drawing color).
  97. -> You may select another color even if you are in midst of drawing an object;
  98.    move out of the work area, click at the color you wish - as soon as you
  99.    move back into the work area, your object will change!
  100. Let's try the filling tool (the left, bottommost one): it will fill all points
  101. it can reach from the pixel you clicked at having the same color, e.g. if you
  102. click at a white pixel, it will color all white pixels neighboured to that
  103. pixel and so on. Note that as long as you don't press the left button a second
  104. time, this coloring doesn't rest, that is if you move around the mouse after
  105. having clicked the first time, MAKES will restart its fill algorithm starting
  106. at the new pixel your mouse points at! This behaviour is a bit confusing in
  107. the beginning but comes in very handy when you get used to it.
  108. -> If you really get stuck - especially on slow machines - then just press the
  109.    right mouse button for two or three seconds to cancel the action and start
  110.    over again.
  111. The last tool to be mentioned is the copy tool (the icon with the scissors):
  112. you can span a (dotted) rectangular area which you want to copy the same way
  113. you would draw a rectangle, but after pressing the mouse button a second time,
  114. a copy of this area will be visible at your cursor which you can place where-
  115. ever you want to. (Note that color 0 inside this copy will be treated as trans-
  116. parent, which makes it easier to overlay objects at the screen!)
  117.  
  118. These 8 icons (the 4 leftmost in the upper and lower row) make up the available
  119. _tools_, the resting 10 icons are "function buttons", that is: their linked
  120. action will take place at once (respectively: after asking you necessary para-
  121. meters).
  122. I'll first name them, starting in the upper row at the 5th icon, in clockwise
  123. order:
  124. a) change color
  125. b) rotate work area left
  126. c) rotate work area right
  127. d) mirror work area horizontally
  128. e) go/move to the upper-left
  129. f) display boundaries
  130. g) mirror work area vertically
  131. h) rotate work area down
  132. i) rotate work area up
  133. j) blink color
  134.  
  135. a)
  136.  You can replace pixels of a specific color by another color with this tool:
  137.  the program will ask you for the colors, which you can select by either
  138.  clicking in the palette area or by clicking at pixels in the work area itself.
  139.  
  140. b), c), h), i)
  141.  Clicking at one of these buttons will move the contents of the work area in
  142.  the according direction, but what "falls out" at one side of the work area
  143.  will show up on the opposite side again. If you hold down "shift" while
  144.  clicking, the image will rotate by one pixel, without shift, it will rotate
  145.  by 1/4 of the actual screen width.
  146.  
  147. d), g)
  148.  I guess these two mirror options should be quite clear; note that as
  149.  they mirror a small image in the upper left corner to the "far away" right/
  150.  bottom region of the work area, you'll often need a tool to "pull back" the
  151.  graphic contents to the upper left corner: that is exactly the task of the
  152.  e) icon: it will move the graphic contents to the top and left as much as
  153.  possible.
  154.  
  155. e)
  156.  As mentioned above, this tool will move the work area contents to the left
  157.  (and top), until column 0 (row 0) holds a non-zero colored pixel.
  158.  If you hold down "shift" while clicking at this icon, there is another
  159.  functionality: then, MAKES scrolls back the visible part of the workarea
  160.  back to the upper left region of the picture (0,0), that is: this is a short-
  161.  cut for pressing the left- and up-arrow keys a few times (see below for more
  162.  about this).
  163.  
  164. f)
  165.  If you want to know/see the boundaries of your sprite, then click at this
  166.  icon: the leftmost and rightmost (upmost & bottommost) pixel of each row
  167.  (column) will blink and a popup window will inform you about the sprite's
  168.  size numerically.
  169.  If you hold down "shift" while clicking this icon, MAKES will also blink all
  170.  transparent areas inside the sprite, which may be useful if you don't know
  171.  whether you must use display mode Display_SHADOW <-> Display_SHADOWEXACT and
  172.  Display_FAST <-> Display_NORMAL; in all other cases you can forget about this
  173.  option.
  174. -> Note that sprites are always stored as the smallest rectangle which
  175.    surrounds them and starts at the upper left corner (0,0): if you don't have
  176.    special reasons to do otherwise, your sprites should start in the upper left
  177.    corner.
  178.    If for example you realize a sprite consisting of one single point at
  179.    coordinates (a,b), the smallest surrounding box with (0,0) as upper left
  180.    corner would be
  181.    (0,0)      (a,0)      of size (a+1)*(b+1) pixels (=bytes)!!!
  182.      ┌──────────┐
  183.      │          │
  184.      │          │
  185.      │          │
  186.      └──────────▀   <─ this is your 1 point
  187.    (0,b)      (a,b)
  188.    (In addition to that, the right edge of this box will be rounded up so that
  189.     the width of the sprite will be a multiple of 4)
  190.    To determine what areas belong to your sprite and which don't, the program
  191.    assumes color 0 to specify no-sprite-areas and all other colors to be part
  192.    of your sprite (roughly spoken).
  193.  
  194. j)
  195.  If for some reason you must know of all pixels of a specific color (e.g. to
  196.  distinguish two very similiar colors), you can use this function: the program
  197.  will ask you to select the color, what you can do by either clicking at a
  198.  work area pixel with that color or at a color in the palette area.
  199.  
  200. Okay, now that we are through with the icons, let's have a look at the keys:
  201. you already know that "+" and "-" zoom in and out the workarea. But if zoom>1
  202. then only a part of the complete workarea (320x200 pixels) will be visible!
  203. To work on the "offscreen" regions, you can scroll the work area by using the
  204. cursor keys: pressing one of the arrow keys will scroll by 1/4 screen into the
  205. corresponding direction; if you hold down "shift" while pressing an arrow key,
  206. it will scroll by one pixel instead. The absolute coordinate value of the
  207. upper left corner you are looking at will be displayed by the two "offset:"
  208. messages, e.g. "offset X: 40" means that there are 40 columns (0..39) to the
  209. left of the visible window of the work area, which you may scroll in by
  210. pressing the left arrow key. (Consider the work area as a view-finder of an
  211. imaginary camera which you may slide into each direction).
  212. A short-cut to return to the work area's origin (0,0) is available, too: press
  213. shift and click at the "go/move to upper left" icon.
  214.  
  215. The function keys do what they tell you:
  216.  F1 = a short summary of the functionality not visible at first sight
  217.  F2 = save the work area's contents to disk as a sprite file
  218.  F3 = load a previously saved sprite into the work area; if you press "shift"
  219.       while activating this icon (or Shift-F3), then the work area won't be
  220.       erased before loading the sprite: this way, you may overlay several
  221.       sprites on the screen
  222.  F4 = save the actually set palette to disk. Note that if you are using the
  223.       BIOS' default palette, the program won't store it to disk (as you don't
  224.       need)
  225.  F5 = load a previously saved palette. This function is especially necessary
  226.       when you used GRAB to capture a sprite from an application using a
  227.       different palette. (See below for more about palette handling)
  228.  F6 = save the work area's contents to disk, this time as a background picture
  229.  F7 = load a previously saved background picture; the same notes apply as said
  230.       to loading sprites (F3)
  231.  F8 = clear screen. This will erase the work area and let you start all over
  232.       again. Note that it won't reset the palette to the BIOS' default! If you
  233.       want that, you have to press Shift-F9, too!
  234.  F9 = map the workarea colors onto another palette. This feature asks you for
  235.       a palette, loads that and then uses a minimum square algorithm to exchange
  236.       each's pixel color by the one from the specified palette which comes as
  237.       close as possible to the original color. (See below for more about that)
  238.       Shift-F9 works the same, but maps to the BIOS' default palette instead
  239.       of asking you for a palette file.
  240.  F10= quit the program
  241.  
  242.  
  243. Note       :
  244. o Palettes:
  245.  Note that if you load/save a sprite or picture file, MAKES won't load/save
  246.  the according palette automatically, you have to do that manually. This has
  247.  been done intentionally, however: never forget that you may design a hundred
  248.  sprites with a hundred different palettes, but when it all comes down to
  249.  display these sprites simultaneously in your programs, only *one* palette may
  250.  be active! For that reason, you must mix all those palettes to the one you are
  251.  going to use. 
  252.  Normally, that won't be that dramatic, as 240 free color shades (it is *very*
  253.  wise not to change the first 16 EGA-compatible colors) seem enough to me, but
  254.  perhaps you want to include a formerly designed sprite A, using palette B,
  255.  into a new program where you use palette C! Before you start mixing a new
  256.  palette D for this old and your new sprites together, you should try mapping
  257.  old sprite A's colors to palette C: To accomplish that, load sprite A (using
  258.  F3), then load its old palette B (using F5); now press "map palette to
  259.  palette" (F9) and tell the program to map onto palette C: if the result looks
  260.  good enough, then save sprite A (perhaps using a different name) and use
  261.  palette C for all items in your program, else you have to find a compromise
  262.  between palettes B and C (I'm actually working on a program which will auto-
  263.  matize that job, but for now, you are on your own!).
  264.  
  265.  To state it clear: there is a conceptional difference between EXCHANGING a
  266.  color (using the "change color" icon) and CHANGING a color itself (by altering
  267.  the RGB values of one or multiple colors):
  268.  - exchanging colors doesn't change the palette, it merely uses another color
  269.    of that palette
  270.  - changing palette colors doesn't change the pixels' color number, but the
  271.    color's RGB value
  272.  In other words: if you exchange colors, then you don't have to save the color
  273.  palette again, as it didn't change, but the sprite, because its data changed.
  274.  On the other hand, if you changed palette colors, then you'll have to save the
  275.  palette, but not the sprite, as the pixel data didn't change.
  276.  (If you didn't get that: just always save both and forget about it...)
  277.  
  278. o Mouse problems:
  279.  I noticed that sometimes, the program hangs when initializing the mouse driver
  280.  (when it calls "INT 33h" with AX=0), what you see in that the starting count-
  281.  down doesn't get below 7. I don't have _any_ idea why this happens and hope
  282.  it won't show up on other systems. Note that this is (at least what I noticed)
  283.  a spurious error: cancel the program, restart it once more and it will work!
  284.  Besides that, when quitting the program, MAKES sometimes reports a senseless
  285.  runtime error - it is a spurious, not reproducable error I couldn't track
  286.  down, either (perhaps TP doesn't like my TSR / QEMM installation, I dunno)!?
  287.  
  288. o SVGA-compatibility problems:
  289.  The 640x400x256 mode seems to make problems on some SVGAs, especially ones
  290.  with Paradise chipsets. Therefore, a command line switch "/480" has been
  291.  added. If you use this switch, the program will start in 640x480x256 mode
  292.  instead. I've been reported that this mode works on almost all cards; the
  293.  only disadvantage is, that the aspect ratio differs from the 320:200 (resp.
  294.  640:400) mode. (Tip: use your monitor's vertical adjustment controller to
  295.  spread the image accordingly if this is a problem for you)
  296.  
  297. o Memory:
  298.  You should have at least 256K free RAM if you start MAKES, or it won't work.
  299.  
  300. o Sprite size:
  301.  If MAKES tells you that it can't save the workarea as a sprite, because it
  302.  is "to big" - well, then you'll have to shrink your sprite! Sorry, but I
  303.  wanted MAKES to handle CODs and PICs at the same time, but 320x200 pixels
  304.  (the size of a picture) is to much for a COD, as the additional data stored
  305.  along with the sprite would make it larger than 64K! (Cut off a few rows or
  306.  columns until it works.)
  307.  Note also that MAKES has to store sprites with widths being a multiple of 4!
  308.  That is: it doesn't matter, whether the max. used x-coordinate is for example
  309.  316, 317, 318 or 319, because for all those 4 widths (0..316=317 pixels,
  310.  0..317=318, 0..318=319, 0..319=320), MAKES would have to store them with
  311.  the "rounded up" width of 320 pixels!
  312.  (In other words: although AniVGA itself can handle sprites up to 32000 pixels
  313.   in each axis and 64K max. size, MAKES restricts you to sprites of x-size at
  314.   most 320 pixels and y-sizes of at most 200 pixels)
  315.  
  316. o COD <-> PIC:
  317.  Yes, you read right: MAKES doesn't care whether you are working on a sprite
  318.  or a picture graphic: just paint it and store it into the format you want
  319.  (subject to what I said above concerning the 64K limit)! Oh yes, that way
  320.  you may convert a sprite into a background picture (and vice versa) if you
  321.  have reason to do so!
  322.  
  323. o Tips:
  324.  
  325.  The best way to design a sprite is to start in midst of a cleared work area.
  326.  If you need more room, rotate your sprite in the appropriate direction.
  327.  If you think you're done, use the rotate boxes again (or the "move to upper-
  328.  left" icon) to align your sprite with the upper left corner. Then click on
  329.  the "display boundaries" box to compare the sprite's size with what you
  330.  expected. To wide (high)? Then there is a pixel with color <> 0 to the right
  331.  (beneath) your sprite! Look at the max. column (row) MAKES told you and kill
  332.  that pixel! (To see it more clearly, just hold down "shift" while clicking
  333.  at the "display boundaries" icon).
  334.  
  335.  If you are unsure whether you can use display mode Display_FAST or need
  336.  Display_NORMAL (same applies for Display_SHADOWEXACT and Display_SHADOW),
  337.  then hold down "shift", click at the "display boundaries" icon and look at
  338.  the picture: if the blinking parts "spread" out of the parts you think your
  339.  sprite should be made of, then you should use Display_NORMAL
  340.  (Display_SHADOWEXACT, respectively), if all the blinking areas are inside your
  341.  sprite, you can (and should) use Display_FAST (Display_SHADOW).
  342. BFFFFFFF - utility
  343. ──────────────────
  344.  
  345. Ever had a flat tire? It makes "bffffffffff" as the air goes out and the tire
  346. becomes smaller and smaller...
  347. BFFFFFFF is a little compression utility which "lets the air out of your data
  348. files". Unlike a flat tire, your data files remain functional, however: AniVGA
  349. has been extended to use some disk reading routines which are "transparent" to
  350. compressed FNT-, PIC-, PAL-, COD- and LIB-files in that it notes whether the
  351. file to read in has been compressed with BFFFFFFF or not and acts accordingly.
  352. You have to supply three command line parameters:
  353. - the source file name,
  354. - the destination file name (which must be different from the source)
  355. - and if you want to (c)ompress or (d)ecompress your file.
  356. For example...
  357.  
  358.  BFFFFFFF mysprite.lib mysprite.new c
  359.  
  360. ...would compress the file mysprite.lib to the file mysprite.new! You could
  361. now delete the old mysprite.lib file and rename mysprite.new to mysprite.lib,
  362. if you want.
  363.  
  364. If you want to create a compressed library, you have several possibilities:
  365. a) First compress the COD-files and then concatenate them to the LIB-file
  366. b) First concatenate the (uncompressed) COD-files and then compress this LIB
  367. c) Concatenate some compressed and not compressed files together to form a
  368.    library (but you may *NOT* compress that library afterwards!!!)
  369. d) Build two compressed libraries, using a),b) or c), and then concatenate
  370.    them to form a new library
  371. In other words, you may concatenate and/or compress freely, as long as you
  372. meet one requirement: no file may be compressed more than one time!
  373. In especially, you may not compress a LIB-file in which one or more COD-files
  374. have already been compressed beforehand!!!
  375.  
  376. The most effective way for compression is b): chain uncompressed COD-files to
  377. build a library and then compress that library. If you are unsure whether one
  378. or more of the files within that library have already been compressed in
  379. before, then use UNLIB on the library (this will result in uncompressed CODs),
  380. bundle these files again to form a library and then compress it.
  381.  
  382. Note : - Using compressed files is a trade off between speed and disk space:
  383.          compressed files take some time to decompress while loading, but pre-
  384.          serve disk space, uncompressed files load faster but occupy more disk
  385.          space.
  386.        - First, create your program with uncompressed data files. Then, decide
  387.          if it pays of to compress the files.
  388.        - All utility files with the exception of BFFFFFFF will produce uncom-
  389.          pressed data files; you'll have to use BFFFFFFF to compress them.
  390.        - As said, you may not "double compress" a file; however, BFFFFFFF can
  391.          care for that automatically with the exception of LIBs (see above)
  392.        - If you type in the command line to invoke BFFFFFFF, don't count the
  393.          "F"s, as MSDos will forgive you, if you type in more than necessary:
  394.          BFFFFFFFFFFFFFFFFFF foobar.cod foobar.new c   will work, too!
  395.        - See "COMPRESS" below for more information about the compression
  396.  
  397. UNLIB - utility
  398. ───────────────
  399.  
  400. Sometimes, you will want to reverse the process of building a sprite library,
  401. that is: you want to split a sprite library into the sprite files of which it
  402. consists.
  403. To do that, call UNLIB with the name of the sprite library to split. UNLIB
  404. will then create the files UNLIB000.COD, UNLIB001.COD, UNLIB002.COD,...  which
  405. represent the sprite files wanted.
  406. Note here that UNLIB cannot restore the original filenames you used (there is
  407. no such entry in a sprite's header). For that, it is a good idea to write down
  408. the names and sequence of the sprite files used in building a sprite library.
  409. (If you didn't, you still can load every extracted sprite with MAKES, look at
  410.  it and give it the right name then)
  411.